feat(hass): add domain-aware intent mapping and prefix detection#50
Open
feat(hass): add domain-aware intent mapping and prefix detection#50
Conversation
Member
Author
Testing Instructionsfor localhost git fetch origin
git checkout feat/enhance-hass-tools
docker compose up --build -dor for remote server git fetch origin
git checkout feat/enhance-hass-tools
docker compose --profile https up --build -dCheck startup logsdocker logs caal-agent 2>&1 | grep -i "prefix\|Home Assistant"Expected if using Test matrix
Debug mode (optional)In Full testing details on #47. |
Extract Home Assistant integration into dedicated module with: - Automatic detection of MCP tool prefixes (assist__ vs bare names) - Device cache with domain information from GetLiveContext - Domain-specific intent mapping (cover -> HassOpenCover, not HassTurnOn) - New actions: open, close, toggle, set_brightness, set_temperature, stop Fixes #47 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When LLM sends set_volume for a light entity, remap to set_brightness. Catches common model confusion between set_volume/set_brightness/ set_temperature based on the actual device domain from the cache. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7b007aa to
b0d2838
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #47 — Enhances Home Assistant integration with domain-aware intent mapping and automatic tool prefix detection.
voice_agent.pytosrc/caal/integrations/hass.py, following existing pattern (n8n.py,web_search.py)assist__prefix at startup for compatibility with different HA MCP servers (official vs community)GetLiveContextto map device names to domains (cover, climate, light, etc.) with 5-minute TTLHassOpenCover/HassCloseCover, climate usesHassClimateSetTemperature, lights useHassLightSetopen,close,toggle,set_brightness,set_temperature,stopIntent Mapping
Test plan
hass_get_statereturns device infoassist__prefixed HA MCP server (VESCreative)🤖 Generated with Claude Code